﻿<?php
	
	require('./includes/libraries/fpdf/html2fpdf.php');
	$pdf=new HTML2FPDF();
	$pdf->AddPage();
	$pdf->SetFont('Arial');
	$percent = round(($price * 76)/1000,2);
	$total = (($price * 76)/1000) + $price;
	$infor = array('company' => $company,
					'invoice_date' => $invoice_date,
					'name' => $last_name." ".$first_name,
					'new_invoice_number' => $new_invoice_number,
					'address' => $address." ".$address2,
					'userid' => $userid,
					'postcode_city' => $postcode_id." ".$cities_name,
					'email' => $userregemail,
					'country' => $countries_name,
					'product' => $product,
					'total' => number_format($total,2,'.',''),
					'percent'  => number_format($percent,2,'.',''),
					'price' => number_format($price,2,'.',''));
	$this->smarty->assign("INFOR",$infor);				
	$content = $this->smarty->fetch("BgcmsWebshop/InComingOrder/form_pdf.tpl");
			   
	$pdf->WriteHTML($content);
	$pdf->Output("./includes/libraries/fpdf/$new_invoice_number.pdf");


?>
